﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>表格大数据量：10000条</title>

    <script src="../scripts/boot.js" type="text/javascript"></script>
    
</head>
<body >

        
<h4>表格大数据量：10000条</h4>
<div id="grid1" class="mini-datagrid" style="width:100%;height:400px;"        
    idField="UID" pageSize="50"
    allowCellEdit="true" allowCellSelect="true" multiSelect="true"    
    showPager="false" virtualScroll="true" 
>
    <div property="columns">
        <div type="indexcolumn"></div>
        <div type="checkcolumn"></div>
        <div name="taskname" field="Name" width="200">任务名称
            
        </div>
        <div field="Duration" width="100">工期</div>
        <div field="PercentComplete" width="100">进度</div>
        <div field="Start" width="100" dateFormat="yyyy-MM-dd">开始日期</div>
        <div field="Finish" width="100" dateFormat="yyyy-MM-dd">完成日期</div>
        <div field="Duration" width="100">工期</div>
        <div field="PercentComplete" width="100">进度</div>
        <div field="Start" width="100" dateFormat="yyyy-MM-dd">开始日期</div>
        <div field="Finish" width="100" dateFormat="yyyy-MM-dd">完成日期</div>

    </div>
</div>

</body>
</html>
<script type="text/javascript">
//    var sss = new Date();
//    window.onload = function () {
//        setTimeout(function () {
//            alert(new Date() - sss);
//        }, 1);
//    };
    
    function fillData() {
        var data = [];
        for (var i = 0, l = 10000; i < l; i++) {
            var o = {
                "UID": i,
                "ParentTaskUID": -1,
                "Name": "项目范围规划" + i,
                "Duration": 5,
                "Start": "2007-01-01",
                "Finish": "2007-01-05",
                "PercentComplete": 0,
                "Summary": 1,
                "Critical": 0,
                "Milestone": 0,
                "PredecessorLink": []
            };
            data.push(o);
        }
        var grid = mini.get("grid1");
        grid.setData(data);
    }

    mini.parse();

    fillData();


</script>